package ch4;

import java.util.Scanner;

public class P3 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入是否是会员：");
        String member = in.next();
        System.out.println("请输入购物金额：");
        double money = in.nextDouble();
        if (member.equals("y")) {
            if (money < 200) {
                money = money * 0.8;
            } else {
                money = money * 0.75;
            }
        } else{
            if (money >= 100)
                money = money * 0.9;
        }
        System.out.println("实际支付：" + money + "元");
    }
}